package com.example.iqiyitest.hztvpaysdk;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.example.iqiyitest.R;
import com.google.gson.Gson;


public class TestActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.test_pay_sdk);
        HztvPayUtil.init(getApplication(),"1a71400d-33d9-4b15-ad76-fcf0c8f4b07f","6a002f9f-55ca-4100-bc1a-704939f82d6b");
        findViewById(R.id.btn_pay).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PayDetail payDetail = new PayDetail();
                //订单号，有调用业务传递
                payDetail.order.AppOrderId="121232193121231231";
                //订单名称
                payDetail.order.OrderName="腾讯视频24小时畅看包1";
                //订单描述信息
                payDetail.order.OrderDesc="";
                //订单金额
                payDetail.order.TxnAmount=0.1;
                //订单类型,eg:VOD,固定值
                payDetail.order.OrderType="VOD";
                HztvPayUtil.startToPay(TestActivity.this, payDetail);
            }
        });
    }

}
